#ifndef WF_DIMRADIAL_H
#define WF_DIMRADIAL_H

#include "wf_dimension.h"
#include "pf_dimradial.h"
#include "gui_export.h"

/**
 * This action class can handle user events to draw radial dimensions.
 *
 */
class GUI_EXPORT WF_DimRadial : public WF_Dimension {
	Q_OBJECT
private:
    enum Status {
        SetEntity,     /**< Choose entity. */
        SetPos,      /**< Choose point. */
		SetText        /**< Setting text label in the command line. */
    };

public:
    WF_DimRadial(PF_Container& container,
                              PF_GraphicView& graphicView);
    ~WF_DimRadial() {}

	static QAction* createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/);
	
	virtual LX_Define::ActionType rtti() {
		return LX_Define::ActionDimRadial;
	}

	virtual void reset();
	
    virtual void trigger();
	void preparePreview();
	
    virtual void mouseMoveEvent(QMouseEvent* e);
    virtual void mouseReleaseEvent(QMouseEvent* e);
	
	virtual void coordinateEvent(PF_CoordinateEvent* e);
    virtual void commandEvent(PF_CommandEvent* e);
        virtual QStringList getAvailableCommands();
	
    virtual void hideOptions();
    virtual void showOptions();

    virtual void updateMouseButtonHints();


private:
    /** Chosen entity (arc / circle) */
    PF_Entity* entity;
	/** Chosen position */
	PF_Vector pos;
    /** Data of new dimension */
    PF_DimRadialAttribute edata;
	/** Last status before entering text. */
	Status lastStatus;
};

#endif
